home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Bounds of s PolygonShape, bug
- Sent: 9/12/96 3:50 PM
- Received: 9/12/96 3:50 PM
- From: Brad Pettit <bpettit@apple.com>
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List
-
-
- The bounds is too small compared to what, the bounds of the points, or
- the bounds of what gets rendered if you frame it? The ODShape does not
- take into account any pen width (which would hang down, and to the right).
-
- --Brad
-
- >I have noticed that if I create an ODShape based on the region of an
- >arbitrary polygon, then later ask for the shape's bounds, the bounds will
- >be too small on the right side and the bottom side, each by one pixel.
- >
- >ODShape* polyShape = ::FW_NewODShape( ev );
- >::FW_SetShapeRegion( ev, polyShape, ::FW_CreatePolygonRegion(
- >fPoly.GetCount(), fPoly.GetPoints() ) );
- >
- >selectionBounds = FW_GetShapeBoundingBox(ev, polyShape);
- >
- >selectionBounds will be too small.
- >
- >The code above begins in FW_CDragCommand::BeginDrag() where the selection
- >is asked to create the drag shape. Immediately afterward the bnds is
- >requested and used. A complex polygon will appear closed when dragged and
- >will leave a trail because the bounds is too small.